﻿<?php $this->load->view('layout/header'); ?>
<form name="form1" method="post" action="<?php echo $post_url; ?>" id="form1">

    <div id="container">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_form">
            <tr class="table_form_title">
                <td colspan="4">
                    <span id="lblTitle"><?php echo isset($productpic['productpicid']) ? '修改' : '添加'; ?></span>产品图片
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">标题：</td>
                <td>
                    <input name="title" type="text" id="title" value="<?php echo $productpic['title']; ?>"/>
                </td>
            </tr>
            <tr class="table_form_row" style="display: none;">
                <td style="width: 15%" align="right">
                    小图设置：
                </td>
                <td>
                    <select name="thumbtype" id="thumbtype">
                        <option value="0">手动上传</option>
                        <option value="-1">由大图生成</option>
                        <option value="HW">├指定高宽缩放(可能变形)</option>
                        <option value="W">├指定宽，高按比例</option>
                        <option value="H">├指定高，宽按比例</option>
                        <option value="Cut">├指定高宽裁减(可能变形)</option>
                        <option value="CutScale">├指定高宽并按比例裁减(推荐)</option>

                    </select>
                </td>
            </tr>
            <tr class="table_form_row" id="trSmallPic">
                <td style="width: 15%" align="right">小图：</td>
                <td>
                    <input name="smallpic" type="text" id="smallpic" value="<?php echo $productpic['smallpic']; ?>"/>
                    <input type="button" value="上传图片" onclick="upload_file('smallpic');" />
                    <input type="button" value="选择图片" onclick="selete_file('smallpic');" />
                    <input type="button" value=" 预览 " onclick="preview_file('smallpic');" />
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    大图：
                </td>
                <td>
                    <input name="bigpic" type="text" id="bigpic" value="<?php echo $productpic['bigpic']; ?>" />
                    <input type="button" value="上传图片" onclick="upload_file('bigpic');" />
                    <input type="button" value="选择图片" onclick="selete_file('bigpic');" />
                    <input type="button" value=" 预览 " onclick="preview_file('bigpic');" />
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">描述：</td>
                <td>
                    <textarea name="description" rows="8" cols="40" id="description"><?php echo $productpic['description']; ?></textarea>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">排序号：</td>
                <td>
                    <input name="listid" type="text" value="<?php echo $productpic['listid']; ?>" id="listid" />
                    <span id="RequiredFieldValidator5" style="color:Red;display:none;">不能为空</span>
                    <span id="RegularExpressionValidator2" style="color:Red;display:none;">只能为数字</span>
                    <input type="hidden" name="hidlistID" id="hidlistID" value="9" />
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    是否关闭：
                </td>
                <td>
                    <span id="radIsClose">
                        <input id="isclose" type="radio" name="isclose" value="1" <?php echo $productpic['isclose'] == 1 ? 'checked="checked" ' : ''; ?>/>
                        <label for="radIsClose_0">是</label>
                        <input id="radIsClose_1" type="radio" name="isclose" value="0" <?php echo $productpic['isclose'] == 0 ? 'checked="checked" ' : ''; ?>/>
                        <label for="radIsClose_1">否</label>
                    </span>
                </td>
            </tr>
            <tr class="table_form_btn">
                <td align="right">&nbsp;
                    
                </td>
                <td colspan="3">
                    <input type="submit" name="btnSave" value="保存" id="btnSave" />
                    <input type="button" name="Submit" value="返回" onclick="javascript:history.go(-1);" />
                    <span id="errMsg" style="color:Red;"></span>
                </td>
            </tr>
        </table>
    </div>

</form>
<?php $this->load->view('layout/footer'); ?>
